#!/usr/bin/env/python
#-*- coding=UTF-8 -*-

class MyFirstClass:
	'这是我的第一个类'
	empCount = 0
	'用户'
	def __init__(self,name,salary):
		self.name = name
		self.salary = salary
		MyFirstClass.empCount +=1
		
	def displayCount(self):
		print("total Employee %d" % MyFirstClass.empCount)
		
	def displayEmployee(self):
		print("name:",self.name,",salary:",self.salary)
		
	def __del__(self):
		class_name = self.__class__.__name__
		print(class_name, "销毁")


class MyFirstClassChild(MyFirstClass):
			def __init__(self,name,salary):
				print('调用的父类，这里是子类')
			def extendFa(self):
				MyFirstClass.displayCount(self)
				
				
a = MyFirstClass('test','100')
r= a.displayCount()
print('----')
r1= a.displayEmployee()
print('----')
print("doc:\n--------",MyFirstClass.__doc__)
print("name:\n-------",MyFirstClass.__name__)
print("module:\n------",MyFirstClass.__module__)
print("bases:\n-----",MyFirstClass.__bases__)
print("dict:\n----",MyFirstClass.__dict__)

print('_________________________child_____________')
b = MyFirstClassChild('child','100')
b_child = b.extendFa()

print(b_child)

